package cn.infomany;

import org.beetl.core.Configuration;
import org.beetl.core.GroupTemplate;
import org.beetl.core.Template;
import org.beetl.core.resource.ClasspathResourceLoader;

import java.io.IOException;

/**
 * 主类
 *
 * @author zjb
 * @date 2020/7/24
 */
public class Main {

    public static void main(String[] args) throws IOException {
        ClasspathResourceLoader resourceLoader = new ClasspathResourceLoader("/", "utf-8");
        Configuration cfg = Configuration.defaultConfiguration();
        GroupTemplate gt = new GroupTemplate(resourceLoader, cfg);
        Template t = gt.getTemplate("/template/hello.t");
        String str = t.render();
        System.out.println(str);
    }
}
